package com.bdqn.demo.controller;

import com.bdqn.demo.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * HelloController
 *
 * @author LILIBO
 * @since 2021-11-19
 */
@Controller
public class HelloController {

    @Autowired
    private HelloService helloService;

    @ResponseBody
    @RequestMapping("/hi")
    public String sayHi() {
        String hi = helloService.sayHi();
        System.out.println(hi);
        return hi;
    }
}
